<template>
  <div id="login">
    <el-row>
      <el-col :span = '8' :offset = '8'>
        <h1>用户登录</h1>
        <el-form :model="user" status-icon  label-width="100px" class="demo-ruleForm">
          <el-form-item label="账号" prop="pass">
            <el-input  v-model="user.account" auto-complete="off"></el-input>
          </el-form-item>
          <el-form-item label="密码" prop="checkPass">
            <el-input type="password" v-model="user.passWord" auto-complete="off"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="submitForm()">登录</el-button>
          </el-form-item>
        </el-form>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: 'login',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      user:{}
    }
  },
  methods:{
    submitForm(){
      console.log(this.user);
      this.$router.push('/home')
    }
  }
}
</script>
